package cn.epsilon3.configBean;

import cn.epsilon3.annotation.E3Config;
import cn.epsilon3.constant.ClassTypeEnum;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @description 计划调度实体映射
 *
 * @author: epsilon3
 * @date: 2023/9/5 10:40
 */
@Data
@Component()
@ConfigurationProperties(
        prefix = "epsilon3.config.scheduled"
)
public class InitializingAsyncScheduledConfig {

    @E3Config(suffixName = "delayTime",
    defaultValue = "5",
    type = ClassTypeEnum.LONG,
    comment = "延迟时间（单位秒）")
    private long delayTime;

    @E3Config(suffixName = "stopWaitTime",
            defaultValue = "180",
            type = ClassTypeEnum.LONG,
            comment = "延迟时间（单位秒）")
    private long stopWaitTime;

    @E3Config(suffixName = "poolCoreSize",
            defaultValue = "32",
            type = ClassTypeEnum.INTEGER,
            comment = "线程池核心数大小")
    private int poolCoreSize;
}
